package com.oig.sys.base.controller;


import com.oig.sys.base.service.ITbHarborAssociationService;
import com.oig.sys.base.vo.HarborAssociationVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name = "船公司的港口名与系统港口映射关联管理")
@RestController
@RequestMapping("/harborAssociation")
@Slf4j
public class TbHarborAssociationController {

    private final ITbHarborAssociationService harborAssociationService;

    @Autowired
    public TbHarborAssociationController(ITbHarborAssociationService harborAssociationService) {
        this.harborAssociationService = harborAssociationService;
    }

    @Operation(summary = "查询所有港口映射信息")
    @GetMapping(value = "/listAll")
    public List<HarborAssociationVo> listAll(){
        log.info("listAll harborAssociation info ") ;
        return this.harborAssociationService.getAllInfoList();
    }
}
